.class Lcom/opongo/android/custom/PostListAdapter$3;
.super Ljava/lang/Object;
.source "PostListAdapter.java"

# interfaces
.implements Landroid/view/View$OnClickListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/opongo/android/custom/PostListAdapter;->bindView(Landroid/view/View;Landroid/content/Context;Landroid/database/Cursor;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/opongo/android/custom/PostListAdapter;

.field private final synthetic val$cursor:Landroid/database/Cursor;


# direct methods
.method constructor <init>(Lcom/opongo/android/custom/PostListAdapter;Landroid/database/Cursor;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 1
    iput-object p1, p0, Lcom/opongo/android/custom/PostListAdapter$3;->this$0:Lcom/opongo/android/custom/PostListAdapter;

    iput-object p2, p0, Lcom/opongo/android/custom/PostListAdapter$3;->val$cursor:Landroid/database/Cursor;

    .line 405
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onClick(Landroid/view/View;)V
    .locals 12
    .parameter "v"

    .prologue
    const v11, 0x7f080056

    const/4 v10, 0x1

    const/4 v9, 0x0

    .line 409
    invoke-static {}, Lcom/opongo/android/custom/PostListAdapter;->access$0()Ljava/lang/String;

    move-result-object v6

    new-instance v7, Ljava/lang/StringBuilder;

    const-string v8, "Open Comment for TagID: "

    invoke-direct {v7, v8}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {p1}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v8

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    invoke-static {v6, v7}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 411
    invoke-virtual {p1}, Landroid/view/View;->getParent()Landroid/view/ViewParent;

    move-result-object v2

    check-cast v2, Landroid/view/View;

    .line 413
    .local v2, parent:Landroid/view/View;
    invoke-virtual {v2, v11}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/Button;

    .line 414
    .local v0, bv:Landroid/widget/Button;
    iget-object v6, p0, Lcom/opongo/android/custom/PostListAdapter$3;->this$0:Lcom/opongo/android/custom/PostListAdapter;

    #getter for: Lcom/opongo/android/custom/PostListAdapter;->activity:Landroid/app/Activity;
    invoke-static {v6}, Lcom/opongo/android/custom/PostListAdapter;->access$2(Lcom/opongo/android/custom/PostListAdapter;)Landroid/app/Activity;

    move-result-object v6

    invoke-virtual {v6}, Landroid/app/Activity;->getResources()Landroid/content/res/Resources;

    move-result-object v6

    const v7, 0x7f020005

    invoke-virtual {v6, v7}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    .line 415
    .local v1, d:Landroid/graphics/drawable/Drawable;
    invoke-virtual {v0, v1}, Landroid/widget/Button;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 416
    invoke-virtual {v0, v9}, Landroid/widget/Button;->setEnabled(Z)V

    move-object v0, p1

    .line 418
    check-cast v0, Landroid/widget/Button;

    .line 419
    iget-object v6, p0, Lcom/opongo/android/custom/PostListAdapter$3;->this$0:Lcom/opongo/android/custom/PostListAdapter;

    #getter for: Lcom/opongo/android/custom/PostListAdapter;->activity:Landroid/app/Activity;
    invoke-static {v6}, Lcom/opongo/android/custom/PostListAdapter;->access$2(Lcom/opongo/android/custom/PostListAdapter;)Landroid/app/Activity;

    move-result-object v6

    invoke-virtual {v6}, Landroid/app/Activity;->getResources()Landroid/content/res/Resources;

    move-result-object v6

    const v7, 0x7f020002

    invoke-virtual {v6, v7}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    .line 420
    invoke-virtual {v0, v1}, Landroid/widget/Button;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 421
    invoke-virtual {v0, v9}, Landroid/widget/Button;->setEnabled(Z)V

    .line 423
    invoke-virtual {p1}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v6

    check-cast v6, Ljava/lang/String;

    invoke-static {v6}, Ljava/lang/Integer;->valueOf(Ljava/lang/String;)Ljava/lang/Integer;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/Integer;->intValue()I

    move-result v3

    .line 424
    .local v3, post_id:I
    iget-object v6, p0, Lcom/opongo/android/custom/PostListAdapter$3;->this$0:Lcom/opongo/android/custom/PostListAdapter;

    #getter for: Lcom/opongo/android/custom/PostListAdapter;->activity:Landroid/app/Activity;
    invoke-static {v6}, Lcom/opongo/android/custom/PostListAdapter;->access$2(Lcom/opongo/android/custom/PostListAdapter;)Landroid/app/Activity;

    move-result-object v6

    invoke-virtual {v6}, Landroid/app/Activity;->getApplicationContext()Landroid/content/Context;

    move-result-object v6

    .line 425
    iget-object v7, p0, Lcom/opongo/android/custom/PostListAdapter$3;->this$0:Lcom/opongo/android/custom/PostListAdapter;

    #getter for: Lcom/opongo/android/custom/PostListAdapter;->activity:Landroid/app/Activity;
    invoke-static {v7}, Lcom/opongo/android/custom/PostListAdapter;->access$2(Lcom/opongo/android/custom/PostListAdapter;)Landroid/app/Activity;

    move-result-object v7

    const v8, 0x7f070048

    invoke-virtual {v7, v8}, Landroid/app/Activity;->getString(I)Ljava/lang/String;

    move-result-object v7

    .line 424
    invoke-static {v6, v7, v9}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v5

    .line 426
    .local v5, toast:Landroid/widget/Toast;
    invoke-virtual {v5}, Landroid/widget/Toast;->show()V

    .line 428
    iget-object v6, p0, Lcom/opongo/android/custom/PostListAdapter$3;->this$0:Lcom/opongo/android/custom/PostListAdapter;

    #getter for: Lcom/opongo/android/custom/PostListAdapter;->activity:Landroid/app/Activity;
    invoke-static {v6}, Lcom/opongo/android/custom/PostListAdapter;->access$2(Lcom/opongo/android/custom/PostListAdapter;)Landroid/app/Activity;

    move-result-object v6

    invoke-virtual {v6}, Landroid/app/Activity;->getApplicationContext()Landroid/content/Context;

    move-result-object v6

    invoke-static {v3, v9, v6}, Lcom/opongo/blogapp/manager/APIManager;->voteSpicy(IZLandroid/content/Context;)Z

    move-result v4

    .line 430
    .local v4, success:Z
    if-eqz v4, :cond_0

    .line 431
    iget-object v6, p0, Lcom/opongo/android/custom/PostListAdapter$3;->this$0:Lcom/opongo/android/custom/PostListAdapter;

    #getter for: Lcom/opongo/android/custom/PostListAdapter;->dbManager:Lcom/opongo/blogapp/manager/DatabaseManager;
    invoke-static {v6}, Lcom/opongo/android/custom/PostListAdapter;->access$3(Lcom/opongo/android/custom/PostListAdapter;)Lcom/opongo/blogapp/manager/DatabaseManager;

    move-result-object v6

    invoke-virtual {v6, v3}, Lcom/opongo/blogapp/manager/DatabaseManager;->setSpicyDealsDidVote(I)V

    .line 432
    iget-object v6, p0, Lcom/opongo/android/custom/PostListAdapter$3;->val$cursor:Landroid/database/Cursor;

    invoke-interface {v6}, Landroid/database/Cursor;->requery()Z

    .line 446
    :goto_0
    return-void

    .line 434
    :cond_0
    invoke-virtual {v2, v11}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    .end local v0           #bv:Landroid/widget/Button;
    check-cast v0, Landroid/widget/Button;

    .line 435
    .restart local v0       #bv:Landroid/widget/Button;
    iget-object v6, p0, Lcom/opongo/android/custom/PostListAdapter$3;->this$0:Lcom/opongo/android/custom/PostListAdapter;

    #getter for: Lcom/opongo/android/custom/PostListAdapter;->activity:Landroid/app/Activity;
    invoke-static {v6}, Lcom/opongo/android/custom/PostListAdapter;->access$2(Lcom/opongo/android/custom/PostListAdapter;)Landroid/app/Activity;

    move-result-object v6

    invoke-virtual {v6}, Landroid/app/Activity;->getResources()Landroid/content/res/Resources;

    move-result-object v6

    const v7, 0x7f020004

    invoke-virtual {v6, v7}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    .line 436
    invoke-virtual {v0, v1}, Landroid/widget/Button;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 437
    invoke-virtual {v0, v10}, Landroid/widget/Button;->setEnabled(Z)V

    move-object v0, p1

    .line 439
    check-cast v0, Landroid/widget/Button;

    .line 440
    iget-object v6, p0, Lcom/opongo/android/custom/PostListAdapter$3;->this$0:Lcom/opongo/android/custom/PostListAdapter;

    #getter for: Lcom/opongo/android/custom/PostListAdapter;->activity:Landroid/app/Activity;
    invoke-static {v6}, Lcom/opongo/android/custom/PostListAdapter;->access$2(Lcom/opongo/android/custom/PostListAdapter;)Landroid/app/Activity;

    move-result-object v6

    invoke-virtual {v6}, Landroid/app/Activity;->getResources()Landroid/content/res/Resources;

    move-result-object v6

    const v7, 0x7f020001

    invoke-virtual {v6, v7}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    .line 441
    invoke-virtual {v0, v1}, Landroid/widget/Button;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 442
    invoke-virtual {v0, v10}, Landroid/widget/Button;->setEnabled(Z)V

    goto :goto_0
.end method
